class Solution:
    def minArray(self, numbers) -> int:
        if len(numbers) == 0:
            return None
        if len(numbers) <= 2:
            return min(numbers)
        if numbers[0]<numbers[-1]:
            return numbers[0]
        mid = len(numbers)//2
        if numbers[mid] > numbers[0]:
            return self.minArray(numbers[mid+1:])
        elif numbers[mid]< numbers[0]:
            return self.minArray(numbers[:mid+1])
        else:
            return min(self.minArray(numbers[mid+1:]), self.minArray(numbers[:mid+1]))

if __name__ == '__main__':
    so = Solution()
    nums1 = [1,3,5]
    r = so.minArray(nums1)
    print(r)
